<?xml version="1.0" encoding="UTF-8"?>
<html filename="docs/BSAXHelpers/TBufferedAttributes2Impl.html">
<body>
<a id="#top"/>
<h1>
	                Class Summary : TBufferedAttributes2Impl </h1> SAX2 extension helper for additional Attributes information,
 implementing the <a href="../BSAXExt/IBufferedAttributes2.html">IBufferedAttributes2</a> interface.

 <blockquote>
 <em>This module, both source code and documentation, is in the
 Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
 </blockquote>

 <p>This is not part of core-only SAX2 distributions.</p>

 <p>The <em>specified</em> flag for each attribute will always
 be true, unless it has been set to false in the copy constructor
 or using <a href="../BSAXHelpers/TBufferedAttributes2Impl.html#setSpecified">setSpecified</a>.
 Similarly, the <em>declared</em> flag for each attribute will
 always be false, except for defaulted attributes (<em>specified</em>
 is false), non-CDATA attributes, or when it is set to true using
 <a href="../BSAXHelpers/TBufferedAttributes2Impl.html#setDeclared">setDeclared</a>.
 If you change an attribute's type by hand, you may need to modify
 its <em>declared</em> flag to match.
 </p>

<br/><b>Since : </b> SAX 2.0 (extensions 1.1 alpha)
<h2>
	              Methods
	            </h2>
<div style="padding-left:10px">
<a href="#isDeclared">
	                  function
	                 isDeclared(Integer) : Boolean</a>
<br/>
<a href="#isDeclared">
	                  function
	                 isDeclared(PSAXChar, Integer) : Boolean</a>
<br/>
<a href="#isDeclared">
	                  function
	                 isDeclared(PSAXChar, Integer, PSAXChar, Integer) : Boolean</a>
<br/>
<a href="#isSpecified">
	                  function
	                 isSpecified(Integer) : Boolean</a>
<br/>
<a href="#isSpecified">
	                  function
	                 isSpecified(PSAXChar, Integer, PSAXChar, Integer) : Boolean</a>
<br/>
<a href="#isSpecified">
	                  function
	                 isSpecified(PSAXChar, Integer) : Boolean</a>
<br/>
<a href="#setAttributes">
	                  procedure
	                 setAttributes(IBufferedAttributes)</a>
<br/>
<a href="#addAttribute">
	                  procedure
	                 addAttribute(PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer, PSAXChar, Integer)</a>
<br/>
<a href="#removeAttribute">
	                  procedure
	                 removeAttribute(Integer)</a>
<br/>
<a href="#setDeclared">
	                  procedure
	                 setDeclared(Integer, Boolean)</a>
<br/>
<a href="#setSpecified">
	                  procedure
	                 setSpecified(Integer, Boolean)</a>
<br/>
</div>
<br/>
<hr width="100%"/>
<a name="#isDeclared">
<p>
<b>function</b> isDeclared( index : Integer) : Boolean; </p>
</a> Returns false unless the attribute was declared in the DTD.
 This helps distinguish two kinds of attributes that SAX reports
 as CDATA:  ones that were declared (and hence are usually valid),
 and those that were not (and which are never valid).

<br/><b>Parameter : </b> index The attribute index (zero-based).
<br/><b>Result : </b> true if the attribute was declared in the DTD,
          false otherwise.
<br/><b>Exception : </b> Exception When the
            supplied index does not identify an attribute.

<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#isDeclared">
<p>
<b>function</b> isDeclared( qName : PSAXChar;  qNameLength : Integer) : Boolean; </p>
</a> Returns false unless the attribute was declared in the DTD.
 This helps distinguish two kinds of attributes that SAX reports
 as CDATA:  ones that were declared (and hence are usually valid),
 and those that were not (and which are never valid).

<br/><b>Parameter : </b> qName The XML 1.0 qualified name.
<br/><b>Parameter : </b> qNameLength The length of the uri buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Result : </b> true if the attribute was declared in the DTD,
          false otherwise.
<br/><b>Exception : </b> ESAXIllegalArgumentException When the
            supplied name does not identify an attribute.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#isDeclared">
<p>
<b>function</b> isDeclared( uri : PSAXChar;  uriLength : Integer;  localName : PSAXChar;  localNameLength : Integer) : Boolean; </p>
</a> Returns false unless the attribute was declared in the DTD.
 This helps distinguish two kinds of attributes that SAX reports
 as CDATA:  ones that were declared (and hence are usually valid),
 and those that were not (and which are never valid).

 <p>Remember that since DTDs do not &quot;understand&quot; namespaces, the
 namespace URI associated with an attribute may not have come from
 the DTD.  The declaration will have applied to the attribute's
 <em>qName</em>.</p>

<br/><b>Parameter : </b> uri The Namespace URI, or the empty string if
        the name has no Namespace URI.
<br/><b>Parameter : </b> uriLength The length of the uri buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> localName The attribute's local name.
<br/><b>Parameter : </b> localNameLength The length of the localName buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Result : </b> true if the attribute was declared in the DTD,
          false otherwise.
<br/><b>Exception : </b> ESAXIllegalArgumentException When the
            supplied names do not identify an attribute.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#isSpecified">
<p>
<b>function</b> isSpecified( index : Integer) : Boolean; </p>
</a> Returns the current value of an attribute's &quot;specified&quot; flag.

<br/><b>Parameter : </b> index The attribute index (zero-based).
<br/><b>Result : </b> true if the value was found in the XML text,
    false if the value was provided by DTD defaulting.
<br/><b>Exception : </b> ESAXIllegalArgumentException When the
            supplied index does not identify an attribute.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#isSpecified">
<p>
<b>function</b> isSpecified( uri : PSAXChar;  uriLength : Integer;  localName : PSAXChar;  localNameLength : Integer) : Boolean; </p>
</a> Returns the current value of an attribute's &quot;specified&quot; flag.

<br/><b>Parameter : </b> uri The Namespace URI, or the empty string if
        the name has no Namespace URI.
<br/><b>Parameter : </b> uriLength The length of the uri buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> localName The attribute's local name.
<br/><b>Parameter : </b> localNameLength The length of the localName buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Result : </b> true if the value was found in the XML text,
    false if the value was provided by DTD defaulting.
<br/><b>Exception : </b> ESAXIllegalArgumentException When the
            supplied names do not identify an attribute.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#isSpecified">
<p>
<b>function</b> isSpecified( qName : PSAXChar;  qNameLength : Integer) : Boolean; </p>
</a> Returns the current value of an attribute's &quot;specified&quot; flag.

<br/><b>Parameter : </b> qName The XML 1.0 qualified name.
<br/><b>Parameter : </b> qNameLength The length of the qName buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Result : </b> true if the value was found in the XML text,
    false if the value was provided by DTD defaulting.
<br/><b>Exception : </b> ESAXIllegalArgumentException When the
            supplied name does not identify an attribute.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setAttributes">
<p>
<b>procedure</b> setAttributes(<b>const</b> atts : IBufferedAttributes); </p>
</a> Copy an entire Attributes object.  The &quot;specified&quot; flags are
 assigned as true, unless the object is an Attributes2 object
 in which case those values are copied.

<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedAttributesImpl.html#setAttributes">TBufferedAttributesImpl.setAttributes</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#addAttribute">
<p>
<b>procedure</b> addAttribute( uri : PSAXChar;  uriLength : Integer;  localName : PSAXChar;  localNameLength : Integer;  qName : PSAXChar;  qNameLength : Integer;  attrType : PSAXChar;  attrTypeLength : Integer;  value : PSAXChar;  valueLength : Integer); </p>
</a> Add an attribute to the end of the list, setting its
 &quot;specified&quot; flag to true.  To set that flag's value
 to false, use <a href="../BSAXHelpers/TBufferedAttributes2Impl.html#setSpecified">setSpecified</a>.

 <p>Unless the attribute <em>type</em> is CDATA, this attribute
 is marked as being declared in the DTD.  To set that flag's value
 to true for CDATA attributes, use <a href="../BSAXHelpers/TBufferedAttributes2Impl.html#setDeclared">setDeclared</a>.</p>

<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedAttributesImpl.html#addAttribute">TBufferedAttributesImpl.addAttribute</a>
<br/><b>Parameter : </b> uri The Namespace URI, or the empty string if
        none is available or Namespace processing is not
        being performed.
<br/><b>Parameter : </b> uriLength The length of the uri buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> localName The local name, or the empty string if
        Namespace processing is not being performed.
<br/><b>Parameter : </b> localNameLength The length of the localName buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> qName The qualified (prefixed) name, or the empty string
        if qualified names are not available.
<br/><b>Parameter : </b> qNameLength The length of the qName buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> attrType The attribute type as a string.
<br/><b>Parameter : </b> attrTypeLength The length of the attrType buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/><b>Parameter : </b> value The attribute value.
<br/><b>Parameter : </b> valueLength The length of the value buffer
   The value may be -1 which indicates that the buffer is
   null-terminated. If the value is 0 then the buffer may be nil.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#removeAttribute">
<p>
<b>procedure</b> removeAttribute( index : Integer); </p>
</a> Remove an attribute declaration.

<br/><b>Parameter : </b> index The index of the attribute (zero-based).
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setDeclared">
<p>
<b>procedure</b> setDeclared( index : Integer;  value : Boolean); </p>
</a> Assign a value to the &quot;declared&quot; flag of a specific attribute.
 This is normally needed only for attributes of type CDATA,
 including attributes whose type is changed to or from CDATA.

<br/><b>Parameter : </b> index The index of the attribute (zero-based).
<br/><b>Parameter : </b> value The desired flag value.
<br/><b>Exception : </b> ESAXIllegalArgumentException When the
            supplied index does not identify an attribute.
<br/><b>See : </b> <a href="../BSAXHelpers/TBufferedAttributes2Impl.html#setType">TBufferedAttributes2Impl.setType</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setSpecified">
<p>
<b>procedure</b> setSpecified( index : Integer;  value : Boolean); </p>
</a> Assign a value to the &quot;specified&quot; flag of a specific attribute.
 This is the only way this flag can be cleared, except clearing
 by initialization with the copy constructor.

<br/><b>Parameter : </b> index The index of the attribute (zero-based).
<br/><b>Parameter : </b> value The desired flag value.
<br/><b>Exception : </b> ESAXIllegalArgumentException When the
            supplied index does not identify an attribute.
<br/>
<p>
<a href="#top">Top</a>
</p>
</body>
</html>